<?$fecha = date("d")."-".date("m")."-".date("Y");?>
<body bgcolor = "#005F8C" alink = "white" vlink = "white" link = "white" text = "white">
<table width  ="100%" height = "100%" cellpadding = "0" cellspacing = "0">

<tr valign = "top">

<td align = "center">

<!--BARRA                    -->

<?include ("./barra/barramutual.php");?>

<!-- FIN DE LA BARRA                    -->
</td>


</tr>


<tr valign = "top" height = "100%"><td align = "left">

<!-- CUERPO DEL SISTEMA -->
<table cellpadding = "0" cellspacing = "0" border  ="0" height = "100%">
<tr valign = "middle"><td bgcolor = "black">


<?include ("links.php");?>



<!-- FIN DEL CUERPO DEL SISTEMA -->







</td><td width = "100%" align = "center">












<?include ("../conectarse.php");
$consulta = "select * from inversion where inv_activo like '1'";
$resultado = mysql_query($consulta);
$suma=0;
while($fila = mysql_fetch_array($resultado)){

$ttldisp = $ttldisp+$fila['inv_importe'];

}

$consulta = "select * from inversionfondos where inv_activo like '1'";
$resultado = mysql_query($consulta);
$suma=0;
while($fila = mysql_fetch_array($resultado)){

$ttldisp2 = $ttldisp2+$fila['inv_importe'];

}



$consulta = "select * from prestamos where pres_estado like '1'";
$resultado = mysql_query($consulta);
$suma=0;
while($fila = mysql_fetch_array($resultado)){

$ttlpres = $ttlpres+$fila['pres_importe'];

}

$ttldisp3 = $ttldisp+$ttldisp2;
$calculo =($ttlpres*100/$ttldisp3)+1;
$calculo = ($calculo/10);
$calculo = substr($calculo,0,strpos($calculo,"."));

if($calculo<1){$calculo=1;}










$mes2 = date("m")+1;
if(strlen($mes2)=="1"){$mes2="0".$mes2;}

$messiguiente = date("Y").$mes2.date("d");
$consulta = "select * from inversion where inv_activo like '1' and inv_fecha_final > $messiguiente";
$resultado = mysql_query($consulta);
$suma=0;
while($fila = mysql_fetch_array($resultado)){

$ttldispmes2 = $ttldispmes2+$fila['inv_importe'];

}

$consulta = "select * from inversionfondos where inv_activo like '1' and inv_fecha_final > $messiguiente";
$resultado = mysql_query($consulta);
$suma=0;
while($fila = mysql_fetch_array($resultado)){

$ttldisp2mes2 = $ttldisp2mes2+$fila['inv_importe'];

}



$consulta = "select * from prestamos where pres_estado like '1'";
$resultado = mysql_query($consulta);
$suma=0;
while($fila = mysql_fetch_array($resultado)){

$ttlpres2 = $ttlpres2+$fila['pres_importe'];

}
$ttldisp3mes2 = $ttldispmes2+$ttldisp2mes2;


$calculo3 = $ttldisp3mes2-$ttlpres2;

$calculo4 = ($calculo3*100)/$ttldisp3mes2;
$calculo4 = $calculo4/10;
$calculo4 = substr($calculo4,0,strpos($calculo4,"."));


if($calculo4<1){$calculo4=1;}

?>











<table cellpadding="0" cellspacing="0" border="1"><TR><TD colspan="3">








<CENTER>PROYECCION ACTUAL<HR><HR>
<TABLE cellpadding="0" cellspacing="0" border="1"><TR height = "40"><D WIDTH = "600">



<table height = "100%" width="100%" border="1" cellpadding="0" cellspacing="0"><TR height = "100%">

<?for($i=0;$i<$calculo;$i++){?>
<TD bgcolor="green" width="50">&nbsp;</TD><?}?>

<?for($i=0;$i<(10-$calculo);$i++){?>
<TD bgcolor="red" width="50">&nbsp;</TD><?}?>

</TR></table>


</TD></TR>







<tr>


<TD>
<table><TR><TD>

<CENTER>MES SIGUIENTE<HR><HR>
<TABLE cellpadding="0" cellspacing="0" border="1"><TR height = "40"><tD WIDTH = "250">



<table height = "100%" width="100%" border="1" cellpadding="0" cellspacing="0"><TR height = "100%">

<?for($i=0;$i<$calculo4;$i++){?>
<TD bgcolor="green" width="50">&nbsp;</TD><?}?>

<?for($i=0;$i<(10-$calculo4);$i++){?>
<TD bgcolor="red" width="50">&nbsp;</TD><?}?>

</TR></table>


</TD></TR></TABLE></CENTER>


</TD>







<br><td>

<TD>


<CENTER>DENTRO DE DOS MESES<HR><HR>
<TABLE cellpadding="0" cellspacing="0" border="1"><TR height = "40"><tD WIDTH = "250">



<table height = "100%" width="100%" border="1" cellpadding="0" cellspacing="0"><TR height = "100%">

<?for($i=0;$i<$calculo4+3;$i++){?>
<TD bgcolor="green" width="50">&nbsp;</TD><?}?>

<?for($i=0;$i<(10-($calculo4+3));$i++){?>
<TD bgcolor="red" width="50">&nbsp;</TD><?}?>

</TR></table>


</TD></TR></TABLE></CENTER>


</TD>

</td>



<td>

<TD>


<CENTER>DENTRO DE TRES MESES<HR><HR>
<TABLE cellpadding="0" cellspacing="0" border="1"><TR height = "40"><tD WIDTH = "250">



<table height = "100%" width="100%" border="1" cellpadding="0" cellspacing="0"><TR height = "100%">

<?for($i=0;$i<$calculo4+3;$i++){?>
<TD bgcolor="green" width="50">&nbsp;</TD><?}?>

<?for($i=0;$i<(10-($calculo4+3));$i++){?>
<TD bgcolor="red" width="50">&nbsp;</TD><?}?>

</TR></table>


</TD></TR></TABLE></CENTER>


</TD>

</td>










</TABLE></CENTER>



























</TD></TR>






<tr><TD>

</TD>






















</table>































</td>
</td></tr>

</table>
